<template>
	<view class="page">
		<uni-card is-full is-shadow :title="businessDetail.business_no" :extra="businessDetail.updated_at" :note="businessDetail.status2">
		    <view class="item">业务名称：{{businessDetail.business_name}}</view>
		    <view class="item">客户姓名：{{businessDetail.customer_name}}</view>
		    <view class="item">联系电话：{{businessDetail.phone}}</view>
		    <view class="item">业务分类：{{businessDetail.sb_info}}</view>
			<button style="margin-top:30upx;" type="warn" size="mini" @click="toFeed">有疑问?</button>
		</uni-card>
	</view>
</template>

<script>
	import uniCard from '@/components/uni-card/uni-card.vue'
	
	import { detail } from '@/api/business.js'
	import '@/mock/business.js'
	
	export default {
		components: {
			uniCard
		},
		data() {
			return {
				businessDetail: {}
			}
		},
		onLoad() {
			this.getDetail()
		},
		methods: {
			getDetail(){
				detail().then(res => {
					if(res.statusCode === 1) {
						this.businessDetail = res.result
					}
				}).catch(err => {
					console.log(err)
				})
			},
			toFeed(){
				uni.navigateTo({
					url: "../feedback/feedback?bus_no=YW201910150TRK3W"
				})
			}
		}
	}
</script>

<style>
	.item {
		font-size:28upx;
		line-height:60upx;
	}
</style>
